package com.qyer.util.log.test;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Locale;

public class testSimpleDate {
	static SimpleDateFormat frm = new SimpleDateFormat("dd/MMM/yyyy:HH:mm:ss",  Locale.US); 
	static SimpleDateFormat logdateformat = new SimpleDateFormat("yyyyMMdd");
	static SimpleDateFormat loghourformat = new SimpleDateFormat("HH");
	
	public static void main(String[] args) {
		String line = "31/Aug/2015:13:50:06"; 
		
		try {
			System.out.println(frm.parse(line));
			System.out.println(logdateformat.format(frm.parse(line)));
			System.out.println(loghourformat.format(frm.parse(line)));
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
